home *** CD-ROM | disk | FTP | other *** search
- Path: ns.ftns.no!kether!art
- From: art@kether.follonett.no (Arthur Hagen)
- Newsgroups: comp.sys.sgi.apps,comp.lang.c++
- Subject: Re: SGI's C++ compiler and the boolean type
- Date: 10 Apr 1996 11:36:31 GMT
- Organization: Interactive Design
- Message-ID: <4kg6fv$h7k@nic.ftns.no>
- References: <4kefm7$oao@ncar.ucar.edu>
- Reply-To: art@mother.idg.no
- NNTP-Posting-Host: kether.follonett.no
-
-
- In article <4kefm7$oao@ncar.ucar.edu>, jadams@sage.cgd.ucar.edu writes:
-
- ...
- > get all kinds of compiler errors whenever it encounters "bool", "true",
- > or "false" in my codes. The only workaround I've been able to come up
- > with is to include the following lines in my header file:
- >
- > typedef int bool;
- > #define true 1
- > #define false 0
-
- And some argue that true should be -1, because then bitwise not works:
-
- ~(true = -1) == (false = 0)
- ~(false = 0) == (true = -1)
-
- --
- Arthur Hagen, Sysadmin, Interactive Design
- Business: art@design.idg.no / http://www.design.idg.no/
- Personal: art@mother.idg.no / http://mother.idg.no/~art/
- Flames: billg@microsoft.com / http://127.0.0.1/
-